/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */

/* $Id: AliAnalysisTaskMCtrue.h 45956 2010-12-10 12:55:37Z agheata $ */
/* AliAnalysisTaskMCtrue.h
 *
 * Template task producing a P_t spectrum and pseudorapidity distribution.
 * Includes explanations of physics and primary track selections
 *
 * Based on tutorial example from offline pages
 * Edited by Arvinder Palaha
 */
#ifndef ALIANALYSISTASKMCtrue_H
#define ALIANALYSISTASKMCtrue_H

class TH1F;
class TList;
class TH2F;
class AliESDtrackCuts;
class THnSparse;
class TH1D;

#ifndef ALIANALYSISTASKSE_H
#include "AliAnalysisTaskSE.h"
#endif

class AliAnalysisTaskMCtrue : public AliAnalysisTaskSE {
 public:
    AliAnalysisTaskMCtrue();
    AliAnalysisTaskMCtrue(const char *name);
    virtual ~AliAnalysisTaskMCtrue();
    
    virtual void    UserCreateOutputObjects();
    virtual void    UserExec(Option_t *option);
    virtual void    Terminate(Option_t *);
    virtual void    SetVtxDiamond(Double_t Vx, Double_t Vy, Double_t Vz) {fVxMax = Vx;fVyMax =Vy;fVzMax = Vz;};   

 private:

    Double_t        fVxMax;          // X vrtx max
    Double_t        fVyMax;          // Y vrtx max
    Double_t        fVzMax;          // Z vrtx max
    TList           *fOutput;        // Output list
    TH1F            *fHistPtPlus;    // Pt spectrum for positive particles before Pt Eta cuts
    TH1F            *fHistPtMinus;   // Pt spectrum for negative particles before Pt Eta cuts
    TH1F            *fHistPt;        // Pt spectrum for all particles before Pt Eta cuts
    TH1F            *fHistPtPlusAfterPtCut; //Pt spectrum for positive particles after Pt cut
    TH1F            *fHistPtMinusAfterPtCut;//Pt spectrum for negative particles after Pt cut
    TH1F            *fHistPtAfterPtCut; //Pt spectrum for charged particles after Pt cut
    TH1F            *fHistEtaPlus;   // Eta spectrum for positive particles before Pt Eta cuts
    TH1F            *fHistEtaMinus;   // Eta spectrum for negative particles before Pt Eta cuts
    TH1F            *fHistEta;        // Eta spectrum for charged particles before Pt Eta cuts
    TH1F            *fHistEtaPlusAfterPtCut; // Eta spectrum for positive particles after Pt cut
    TH1F            *fHistEtaMinusAfterPtCut; // Eta spectrum for negative particles after Pt cut
    TH1F            *fHistEtaAfterPtCut; // Eta spectrum for charged particles after Pt cut
    TH1F            *fHistEtaAfterCuts;  // Eta spectrum for charged particles after all cuts
    TH1F            *fHistPtAfterCuts;   // Pt spectrum for charged particles after all cuts
    TH2F            *fHistEtaPtAfterCuts; // Eta Pt spectrum for charged particles after all cuts
    TH1F            *fHistVtxX;      //vertex x coordinate distribution
    TH1F            *fHistVtxY;      //vertex y coordinate distribution
    TH1F            *fHistVtxZ;      //vertex z coordinate distribution
    TH1I            *fHistMClabels;
    TH1D            *fHistTrackCharge;

    TH2F            *fHistEtaPhiPlus;  //EtaPhi distribution for positive particles after all cuts
    TH2F            *fHistEtaPhiMinus; //EtaPhi distribution for negative particles after all cuts
    TH2F            *fHistEtaPhi;

    THnSparseF        **fHistsSparse;   //array of sparse hists for every config of eta windows

    TH1F            *fHistNpEvent;
    TH1F            *fHistNmEvent;
    TH2F            *fHistPtEtaEvent;
    TH1D            *fHistEventCutStats;  //Hist for displaying EventCut statistics
    TH1D            *fHistTrackCutStats;  //Hist for displaying TrackCut statistics

   // NEW HISTO to be declared here
    
    AliAnalysisTaskMCtrue(const AliAnalysisTaskMCtrue&); // not implemented
    AliAnalysisTaskMCtrue& operator=(const AliAnalysisTaskMCtrue&); // not implemented
    
    ClassDef(AliAnalysisTaskMCtrue, 2); // example of analysis
};

#endif

